package chapter;

class NetJavaUser
{
	public NetJavaUser()
	{
		this.userName="unkown user name";
		this.passWord="passWord";
	}
	
	public String login(){
		return "success";
	}
	
	public void modifyInfo(String newName,String newPWD){
		userName=newName;
		passWord=newPWD;
	}
	public String toString(){
		return "userName:"+userName+"passWord:"+passWord;
		
	}
	
	private String userName;
	private String passWord;
	
	public static void main(String[]atgs)
	{
		NetJavaUser user1=new NetJavaUser();
		NetJavaUser user2=new NetJavaUser();
		user2.modifyInfo("i'm javake", "yuan");
		user1.modifyInfo("i'm netjava", "yuan");
		System.out.println("the first:"+user1.toString());
		System.out.print("the second:"+user2.toString());
	}
	
		
}

